package com.ourteam.system.dao;

import net.dao.BaseQueryBean;
import net.dao.BaseWhereCriterion;
import net.dao.IDataAccessInterface;

import org.apache.commons.lang.StringUtils;

import java.util.Arrays;
import java.util.List;
import java.util.Map;


/**
 * Template Name : DAO查询对象
 * Template Version : 1
 * Template Last Modfiy Date : Sat Aug 19 10:06:32 CST 2017
 * Auto Generate Date : 2018-07-31 15:13:33
  * Warning ! This file will be overwrite when regenerate !
  *
 */
public class SysUserDepartmentRelateDAOQueryBean extends BaseQueryBean {
    public SysUserDepartmentRelateDAOQueryBean() {
        super();
    }

    public SysUserDepartmentRelateDAOQueryBean(BaseQueryBean aQueryBean) {
        super(aQueryBean);
    }

    public SysUserDepartmentRelateDAOQueryBean(BaseQueryBean aQueryBean,
        Map tableReplaceMap) {
        super(aQueryBean, tableReplaceMap);
    }

    public Criteria createCriteria() {
        Criteria criteria = createCriteriaInternal();

        if (oredCriteria.size() == 0) {
            oredCriteria.add(criteria);
        }

        return criteria;
    }

    protected Criteria createCriteriaInternal() {
        return new Criteria(this);
    }

    public void addIdSelectProperty() {
        addIdSelectProperty("id");
    }

    public void addIdSelectProperty(String aAlias) {
        if (StringUtils.isNotBlank(aAlias)) {
            addSelectProperty(ISysUserDepartmentRelateDAO.Id, aAlias);
        } else {
            addSelectProperty(ISysUserDepartmentRelateDAO.Id, "id");
        }
    }

    public void addSysUserIdSelectProperty() {
        addSysUserIdSelectProperty("sysUserId");
    }

    public void addSysUserIdSelectProperty(String aAlias) {
        if (StringUtils.isNotBlank(aAlias)) {
            addSelectProperty(ISysUserDepartmentRelateDAO.SysUserId, aAlias);
        } else {
            addSelectProperty(ISysUserDepartmentRelateDAO.SysUserId, "sysUserId");
        }
    }

    public void addSysDepartmentIdSelectProperty() {
        addSysDepartmentIdSelectProperty("sysDepartmentId");
    }

    public void addSysDepartmentIdSelectProperty(String aAlias) {
        if (StringUtils.isNotBlank(aAlias)) {
            addSelectProperty(ISysUserDepartmentRelateDAO.SysDepartmentId,
                aAlias);
        } else {
            addSelectProperty(ISysUserDepartmentRelateDAO.SysDepartmentId,
                "sysDepartmentId");
        }
    }

    public void addDepartmentRoleSelectProperty() {
        addDepartmentRoleSelectProperty("departmentRole");
    }

    public void addDepartmentRoleSelectProperty(String aAlias) {
        if (StringUtils.isNotBlank(aAlias)) {
            addSelectProperty(ISysUserDepartmentRelateDAO.DepartmentRole, aAlias);
        } else {
            addSelectProperty(ISysUserDepartmentRelateDAO.DepartmentRole,
                "departmentRole");
        }
    }

    public void addStatusSelectProperty() {
        addStatusSelectProperty("status");
    }

    public void addStatusSelectProperty(String aAlias) {
        if (StringUtils.isNotBlank(aAlias)) {
            addSelectProperty(ISysUserDepartmentRelateDAO.Status, aAlias);
        } else {
            addSelectProperty(ISysUserDepartmentRelateDAO.Status, "status");
        }
    }

    public void addSysUserNameSelectProperty() {
        addSysUserNameSelectProperty("sysUserName");
    }

    public void addSysUserNameSelectProperty(String aAlias) {
        if (StringUtils.isNotBlank(aAlias)) {
            addSelectProperty(ISysUserDepartmentRelateDAO.SysUserName, aAlias);
        } else {
            addSelectProperty(ISysUserDepartmentRelateDAO.SysUserName,
                "sysUserName");
        }
    }

    public void addSysUserAccountSelectProperty() {
        addSysUserAccountSelectProperty("sysUserAccount");
    }

    public void addSysUserAccountSelectProperty(String aAlias) {
        if (StringUtils.isNotBlank(aAlias)) {
            addSelectProperty(ISysUserDepartmentRelateDAO.SysUserAccount, aAlias);
        } else {
            addSelectProperty(ISysUserDepartmentRelateDAO.SysUserAccount,
                "sysUserAccount");
        }
    }

    public void addSysUserRemarksSelectProperty() {
        addSysUserRemarksSelectProperty("sysUserRemarks");
    }

    public void addSysUserRemarksSelectProperty(String aAlias) {
        if (StringUtils.isNotBlank(aAlias)) {
            addSelectProperty(ISysUserDepartmentRelateDAO.SysUserRemarks, aAlias);
        } else {
            addSelectProperty(ISysUserDepartmentRelateDAO.SysUserRemarks,
                "sysUserRemarks");
        }
    }

    public void addSysUserStatusSelectProperty() {
        addSysUserStatusSelectProperty("sysUserStatus");
    }

    public void addSysUserStatusSelectProperty(String aAlias) {
        if (StringUtils.isNotBlank(aAlias)) {
            addSelectProperty(ISysUserDepartmentRelateDAO.SysUserStatus, aAlias);
        } else {
            addSelectProperty(ISysUserDepartmentRelateDAO.SysUserStatus,
                "sysUserStatus");
        }
    }

    public void addSysUserMobilePhoneSelectProperty() {
        addSysUserMobilePhoneSelectProperty("sysUserMobilePhone");
    }

    public void addSysUserMobilePhoneSelectProperty(String aAlias) {
        if (StringUtils.isNotBlank(aAlias)) {
            addSelectProperty(ISysUserDepartmentRelateDAO.SysUserMobilePhone,
                aAlias);
        } else {
            addSelectProperty(ISysUserDepartmentRelateDAO.SysUserMobilePhone,
                "sysUserMobilePhone");
        }
    }

    public void addDepartmentNameSelectProperty() {
        addDepartmentNameSelectProperty("departmentName");
    }

    public void addDepartmentNameSelectProperty(String aAlias) {
        if (StringUtils.isNotBlank(aAlias)) {
            addSelectProperty(ISysUserDepartmentRelateDAO.DepartmentName, aAlias);
        } else {
            addSelectProperty(ISysUserDepartmentRelateDAO.DepartmentName,
                "departmentName");
        }
    }

    public void addAllSelectProperties() {
        addIdSelectProperty();

        addSysUserIdSelectProperty();

        addSysDepartmentIdSelectProperty();

        addDepartmentRoleSelectProperty();

        addStatusSelectProperty();

        addSysUserNameSelectProperty();

        addSysUserAccountSelectProperty();

        addSysUserRemarksSelectProperty();

        addSysUserStatusSelectProperty();

        addSysUserMobilePhoneSelectProperty();

        addDepartmentNameSelectProperty();
    }

    public static class Criteria extends BaseWhereCriterion<SysUserDepartmentRelateDAOQueryBean> {
        protected Criteria(SysUserDepartmentRelateDAOQueryBean aParentObject) {
            super(aParentObject);
        }

        public Criteria andIdIsNull() {
            addCriterion(ISysUserDepartmentRelateDAO.Id + " is null");

            return this;
        }

        public Criteria andIdIsNotNull() {
            addCriterion(ISysUserDepartmentRelateDAO.Id + " is not null");

            return this;
        }

        public Criteria andIdIsNotEmpty() {
            addCriterion(ISysUserDepartmentRelateDAO.Id + " is not null AND " +
                ISysUserDepartmentRelateDAO.Id + " <> ''");

            return this;
        }

        public Criteria andIdIsEmpty() {
            addCriterion("(" + ISysUserDepartmentRelateDAO.Id + " is null OR " +
                ISysUserDepartmentRelateDAO.Id + " = '')");

            return this;
        }

        public Criteria andIdEqualTo(long value) {
            return andIdEqualTo(Long.valueOf(value));
        }

        public Criteria andIdEqualTo(java.lang.Long value) {
            addCriterion(ISysUserDepartmentRelateDAO.Id + " = ", value, "id");

            return this;
        }

        public Criteria andIdEqualToForeignKey(java.lang.String key) {
            StringBuffer str = new StringBuffer(ISysUserDepartmentRelateDAO.Id);
            str.append(" = ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andIdEqualTo(BaseQueryBean subQueryBean,
            IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysUserDepartmentRelateDAO.Id + " = ", subQueryBean,
                dao);

            return this;
        }

        public Criteria andIdNotEqualTo(long value) {
            return andIdNotEqualTo(Long.valueOf(value));
        }

        public Criteria andIdNotEqualTo(java.lang.Long value) {
            addCriterion(ISysUserDepartmentRelateDAO.Id + " <>", value, "id");

            return this;
        }

        public Criteria andIdNotEqualToOrIsNull(long value) {
            return andIdNotEqualToOrIsNull(Long.valueOf(value));
        }

        public Criteria andIdNotEqualToOrIsNull(java.lang.Long value) {
            addCriterion(ISysUserDepartmentRelateDAO.Id + " is null OR " +
                ISysUserDepartmentRelateDAO.Id + " <>", value, "id");

            return this;
        }

        public Criteria andIdNotEqualToForeignKey(java.lang.String key) {
            StringBuffer str = new StringBuffer(ISysUserDepartmentRelateDAO.Id);
            str.append(" <> ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andIdNotEqualTo(BaseQueryBean subQueryBean,
            IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysUserDepartmentRelateDAO.Id + " <> ", subQueryBean,
                dao);

            return this;
        }

        public Criteria andIdGreaterThan(long value) {
            return andIdGreaterThan(Long.valueOf(value));
        }

        public Criteria andIdGreaterThan(java.lang.Long value) {
            addCriterion(ISysUserDepartmentRelateDAO.Id + " >", value, "id");

            return this;
        }

        public Criteria andIdGreaterThanForeignKey(java.lang.String key) {
            StringBuffer str = new StringBuffer(ISysUserDepartmentRelateDAO.Id);
            str.append(" > ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andIdGreaterThan(BaseQueryBean subQueryBean,
            IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysUserDepartmentRelateDAO.Id + " > ", subQueryBean,
                dao);

            return this;
        }

        public Criteria andIdGreaterThanOrEqualTo(long value) {
            return andIdGreaterThanOrEqualTo(Long.valueOf(value));
        }

        public Criteria andIdGreaterThanOrEqualTo(java.lang.Long value) {
            addCriterion(ISysUserDepartmentRelateDAO.Id + " >=", value, "id");

            return this;
        }

        public Criteria andIdGreaterThanOrEqualToForeignKey(
            java.lang.String key) {
            StringBuffer str = new StringBuffer(ISysUserDepartmentRelateDAO.Id);
            str.append(" >= ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andIdGreaterThanOrEqualTo(BaseQueryBean subQueryBean,
            IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysUserDepartmentRelateDAO.Id + " >= ", subQueryBean,
                dao);

            return this;
        }

        public Criteria andIdLessThan(long value) {
            return andIdLessThan(Long.valueOf(value));
        }

        public Criteria andIdLessThan(java.lang.Long value) {
            addCriterion(ISysUserDepartmentRelateDAO.Id + " <", value, "id");

            return this;
        }

        public Criteria andIdLessThanForeignKey(java.lang.String key) {
            StringBuffer str = new StringBuffer(ISysUserDepartmentRelateDAO.Id);
            str.append(" < ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andIdLessThan(BaseQueryBean subQueryBean,
            IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysUserDepartmentRelateDAO.Id + " < ", subQueryBean,
                dao);

            return this;
        }

        public Criteria andIdLessThanOrEqualTo(long value) {
            return andIdLessThanOrEqualTo(Long.valueOf(value));
        }

        public Criteria andIdLessThanOrEqualTo(java.lang.Long value) {
            addCriterion(ISysUserDepartmentRelateDAO.Id + " <=", value, "id");

            return this;
        }

        public Criteria andIdLessThanOrEqualToForeignKey(java.lang.String key) {
            StringBuffer str = new StringBuffer(ISysUserDepartmentRelateDAO.Id);
            str.append(" <= ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andIdLessThanOrEqualTo(BaseQueryBean subQueryBean,
            IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysUserDepartmentRelateDAO.Id + " <= ", subQueryBean,
                dao);

            return this;
        }

        public Criteria andIdIn(long[] values) {
            if (values.length == 1) {
                return andIdEqualTo((java.lang.Long) values[0]);
            } else {
                addCriterion(ISysUserDepartmentRelateDAO.Id + " in", values,
                    "id");

                return this;
            }
        }

        public Criteria andIdNotIn(long[] values) {
            if (values.length == 1) {
                return andIdNotEqualTo((java.lang.Long) values[0]);
            } else {
                addCriterion(ISysUserDepartmentRelateDAO.Id + " not in",
                    values, "id");

                return this;
            }
        }

        public Criteria andIdIn(List<java.lang.Long> values) {
            if (values.size() == 1) {
                return andIdEqualTo(values.get(0));
            } else {
                addCriterion(ISysUserDepartmentRelateDAO.Id + " in", values,
                    "id");

                return this;
            }
        }

        public Criteria andIdNotIn(List<java.lang.Long> values) {
            if (values.size() == 1) {
                return andIdNotEqualTo(values.get(0));
            } else {
                addCriterion(ISysUserDepartmentRelateDAO.Id + " not in",
                    values, "id");

                return this;
            }
        }

        public Criteria andIdIn(java.lang.Long[] values) {
            if (values.length == 1) {
                return andIdEqualTo(values[0]);
            } else {
                addCriterion(ISysUserDepartmentRelateDAO.Id + " in",
                    Arrays.asList(values), "id");

                return this;
            }
        }

        public Criteria andIdNotIn(java.lang.Long[] values) {
            if (values.length == 1) {
                return andIdNotEqualTo(values[0]);
            } else {
                addCriterion(ISysUserDepartmentRelateDAO.Id + " not in",
                    Arrays.asList(values), "id");

                return this;
            }
        }

        public Criteria andIdIn(BaseQueryBean subQueryBean,
            IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysUserDepartmentRelateDAO.Id + " in ", subQueryBean,
                dao);

            return this;
        }

        public Criteria andIdNotIn(BaseQueryBean subQueryBean,
            IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysUserDepartmentRelateDAO.Id + " not in ",
                subQueryBean, dao);

            return this;
        }

        public Criteria andIdBetween(long value1, long value2) {
            addCriterion(ISysUserDepartmentRelateDAO.Id + " between", value1,
                value2, "id");

            return this;
        }

        public Criteria andIdBetween(java.lang.Long value1,
            java.lang.Long value2) {
            addCriterion(ISysUserDepartmentRelateDAO.Id + " between", value1,
                value2, "id");

            return this;
        }

        public Criteria andIdNotBetween(long value1, long value2) {
            addCriterion(ISysUserDepartmentRelateDAO.Id + " not between",
                value1, value2, "id");

            return this;
        }

        public Criteria andIdNotBetween(java.lang.Long value1,
            java.lang.Long value2) {
            addCriterion(ISysUserDepartmentRelateDAO.Id + " not between",
                value1, value2, "id");

            return this;
        }

        public Criteria andSysUserIdIsNull() {
            addCriterion(ISysUserDepartmentRelateDAO.SysUserId + " is null");

            return this;
        }

        public Criteria andSysUserIdIsNotNull() {
            addCriterion(ISysUserDepartmentRelateDAO.SysUserId +
                " is not null");

            return this;
        }

        public Criteria andSysUserIdIsNotEmpty() {
            addCriterion(ISysUserDepartmentRelateDAO.SysUserId +
                " is not null AND " + ISysUserDepartmentRelateDAO.SysUserId +
                " <> ''");

            return this;
        }

        public Criteria andSysUserIdIsEmpty() {
            addCriterion("(" + ISysUserDepartmentRelateDAO.SysUserId +
                " is null OR " + ISysUserDepartmentRelateDAO.SysUserId +
                " = '')");

            return this;
        }

        public Criteria andSysUserIdEqualTo(long value) {
            return andSysUserIdEqualTo(Long.valueOf(value));
        }

        public Criteria andSysUserIdEqualTo(java.lang.Long value) {
            addCriterion(ISysUserDepartmentRelateDAO.SysUserId + " = ", value,
                "sysUserId");

            return this;
        }

        public Criteria andSysUserIdEqualToForeignKey(java.lang.String key) {
            StringBuffer str = new StringBuffer(ISysUserDepartmentRelateDAO.SysUserId);
            str.append(" = ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andSysUserIdEqualTo(BaseQueryBean subQueryBean,
            IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysUserDepartmentRelateDAO.SysUserId + " = ",
                subQueryBean, dao);

            return this;
        }

        public Criteria andSysUserIdNotEqualTo(long value) {
            return andSysUserIdNotEqualTo(Long.valueOf(value));
        }

        public Criteria andSysUserIdNotEqualTo(java.lang.Long value) {
            addCriterion(ISysUserDepartmentRelateDAO.SysUserId + " <>", value,
                "sysUserId");

            return this;
        }

        public Criteria andSysUserIdNotEqualToOrIsNull(long value) {
            return andSysUserIdNotEqualToOrIsNull(Long.valueOf(value));
        }

        public Criteria andSysUserIdNotEqualToOrIsNull(java.lang.Long value) {
            addCriterion(ISysUserDepartmentRelateDAO.SysUserId +
                " is null OR " + ISysUserDepartmentRelateDAO.SysUserId + " <>",
                value, "sysUserId");

            return this;
        }

        public Criteria andSysUserIdNotEqualToForeignKey(java.lang.String key) {
            StringBuffer str = new StringBuffer(ISysUserDepartmentRelateDAO.SysUserId);
            str.append(" <> ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andSysUserIdNotEqualTo(BaseQueryBean subQueryBean,
            IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysUserDepartmentRelateDAO.SysUserId + " <> ",
                subQueryBean, dao);

            return this;
        }

        public Criteria andSysUserIdGreaterThan(long value) {
            return andSysUserIdGreaterThan(Long.valueOf(value));
        }

        public Criteria andSysUserIdGreaterThan(java.lang.Long value) {
            addCriterion(ISysUserDepartmentRelateDAO.SysUserId + " >", value,
                "sysUserId");

            return this;
        }

        public Criteria andSysUserIdGreaterThanForeignKey(java.lang.String key) {
            StringBuffer str = new StringBuffer(ISysUserDepartmentRelateDAO.SysUserId);
            str.append(" > ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andSysUserIdGreaterThan(BaseQueryBean subQueryBean,
            IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysUserDepartmentRelateDAO.SysUserId + " > ",
                subQueryBean, dao);

            return this;
        }

        public Criteria andSysUserIdGreaterThanOrEqualTo(long value) {
            return andSysUserIdGreaterThanOrEqualTo(Long.valueOf(value));
        }

        public Criteria andSysUserIdGreaterThanOrEqualTo(java.lang.Long value) {
            addCriterion(ISysUserDepartmentRelateDAO.SysUserId + " >=", value,
                "sysUserId");

            return this;
        }

        public Criteria andSysUserIdGreaterThanOrEqualToForeignKey(
            java.lang.String key) {
            StringBuffer str = new StringBuffer(ISysUserDepartmentRelateDAO.SysUserId);
            str.append(" >= ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andSysUserIdGreaterThanOrEqualTo(
            BaseQueryBean subQueryBean, IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysUserDepartmentRelateDAO.SysUserId + " >= ",
                subQueryBean, dao);

            return this;
        }

        public Criteria andSysUserIdLessThan(long value) {
            return andSysUserIdLessThan(Long.valueOf(value));
        }

        public Criteria andSysUserIdLessThan(java.lang.Long value) {
            addCriterion(ISysUserDepartmentRelateDAO.SysUserId + " <", value,
                "sysUserId");

            return this;
        }

        public Criteria andSysUserIdLessThanForeignKey(java.lang.String key) {
            StringBuffer str = new StringBuffer(ISysUserDepartmentRelateDAO.SysUserId);
            str.append(" < ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andSysUserIdLessThan(BaseQueryBean subQueryBean,
            IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysUserDepartmentRelateDAO.SysUserId + " < ",
                subQueryBean, dao);

            return this;
        }

        public Criteria andSysUserIdLessThanOrEqualTo(long value) {
            return andSysUserIdLessThanOrEqualTo(Long.valueOf(value));
        }

        public Criteria andSysUserIdLessThanOrEqualTo(java.lang.Long value) {
            addCriterion(ISysUserDepartmentRelateDAO.SysUserId + " <=", value,
                "sysUserId");

            return this;
        }

        public Criteria andSysUserIdLessThanOrEqualToForeignKey(
            java.lang.String key) {
            StringBuffer str = new StringBuffer(ISysUserDepartmentRelateDAO.SysUserId);
            str.append(" <= ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andSysUserIdLessThanOrEqualTo(
            BaseQueryBean subQueryBean, IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysUserDepartmentRelateDAO.SysUserId + " <= ",
                subQueryBean, dao);

            return this;
        }

        public Criteria andSysUserIdIn(long[] values) {
            if (values.length == 1) {
                return andSysUserIdEqualTo((java.lang.Long) values[0]);
            } else {
                addCriterion(ISysUserDepartmentRelateDAO.SysUserId + " in",
                    values, "sysUserId");

                return this;
            }
        }

        public Criteria andSysUserIdNotIn(long[] values) {
            if (values.length == 1) {
                return andSysUserIdNotEqualTo((java.lang.Long) values[0]);
            } else {
                addCriterion(ISysUserDepartmentRelateDAO.SysUserId + " not in",
                    values, "sysUserId");

                return this;
            }
        }

        public Criteria andSysUserIdIn(List<java.lang.Long> values) {
            if (values.size() == 1) {
                return andSysUserIdEqualTo(values.get(0));
            } else {
                addCriterion(ISysUserDepartmentRelateDAO.SysUserId + " in",
                    values, "sysUserId");

                return this;
            }
        }

        public Criteria andSysUserIdNotIn(List<java.lang.Long> values) {
            if (values.size() == 1) {
                return andSysUserIdNotEqualTo(values.get(0));
            } else {
                addCriterion(ISysUserDepartmentRelateDAO.SysUserId + " not in",
                    values, "sysUserId");

                return this;
            }
        }

        public Criteria andSysUserIdIn(java.lang.Long[] values) {
            if (values.length == 1) {
                return andSysUserIdEqualTo(values[0]);
            } else {
                addCriterion(ISysUserDepartmentRelateDAO.SysUserId + " in",
                    Arrays.asList(values), "sysUserId");

                return this;
            }
        }

        public Criteria andSysUserIdNotIn(java.lang.Long[] values) {
            if (values.length == 1) {
                return andSysUserIdNotEqualTo(values[0]);
            } else {
                addCriterion(ISysUserDepartmentRelateDAO.SysUserId + " not in",
                    Arrays.asList(values), "sysUserId");

                return this;
            }
        }

        public Criteria andSysUserIdIn(BaseQueryBean subQueryBean,
            IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysUserDepartmentRelateDAO.SysUserId + " in ",
                subQueryBean, dao);

            return this;
        }

        public Criteria andSysUserIdNotIn(BaseQueryBean subQueryBean,
            IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysUserDepartmentRelateDAO.SysUserId + " not in ",
                subQueryBean, dao);

            return this;
        }

        public Criteria andSysUserIdBetween(long value1, long value2) {
            addCriterion(ISysUserDepartmentRelateDAO.SysUserId + " between",
                value1, value2, "sysUserId");

            return this;
        }

        public Criteria andSysUserIdBetween(java.lang.Long value1,
            java.lang.Long value2) {
            addCriterion(ISysUserDepartmentRelateDAO.SysUserId + " between",
                value1, value2, "sysUserId");

            return this;
        }

        public Criteria andSysUserIdNotBetween(long value1, long value2) {
            addCriterion(ISysUserDepartmentRelateDAO.SysUserId +
                " not between", value1, value2, "sysUserId");

            return this;
        }

        public Criteria andSysUserIdNotBetween(java.lang.Long value1,
            java.lang.Long value2) {
            addCriterion(ISysUserDepartmentRelateDAO.SysUserId +
                " not between", value1, value2, "sysUserId");

            return this;
        }

        public Criteria andSysDepartmentIdIsNull() {
            addCriterion(ISysUserDepartmentRelateDAO.SysDepartmentId +
                " is null");

            return this;
        }

        public Criteria andSysDepartmentIdIsNotNull() {
            addCriterion(ISysUserDepartmentRelateDAO.SysDepartmentId +
                " is not null");

            return this;
        }

        public Criteria andSysDepartmentIdIsNotEmpty() {
            addCriterion(ISysUserDepartmentRelateDAO.SysDepartmentId +
                " is not null AND " +
                ISysUserDepartmentRelateDAO.SysDepartmentId + " <> ''");

            return this;
        }

        public Criteria andSysDepartmentIdIsEmpty() {
            addCriterion("(" + ISysUserDepartmentRelateDAO.SysDepartmentId +
                " is null OR " + ISysUserDepartmentRelateDAO.SysDepartmentId +
                " = '')");

            return this;
        }

        public Criteria andSysDepartmentIdEqualTo(long value) {
            return andSysDepartmentIdEqualTo(Long.valueOf(value));
        }

        public Criteria andSysDepartmentIdEqualTo(java.lang.Long value) {
            addCriterion(ISysUserDepartmentRelateDAO.SysDepartmentId + " = ",
                value, "sysDepartmentId");

            return this;
        }

        public Criteria andSysDepartmentIdEqualToForeignKey(
            java.lang.String key) {
            StringBuffer str = new StringBuffer(ISysUserDepartmentRelateDAO.SysDepartmentId);
            str.append(" = ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andSysDepartmentIdEqualTo(BaseQueryBean subQueryBean,
            IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysUserDepartmentRelateDAO.SysDepartmentId + " = ",
                subQueryBean, dao);

            return this;
        }

        public Criteria andSysDepartmentIdNotEqualTo(long value) {
            return andSysDepartmentIdNotEqualTo(Long.valueOf(value));
        }

        public Criteria andSysDepartmentIdNotEqualTo(java.lang.Long value) {
            addCriterion(ISysUserDepartmentRelateDAO.SysDepartmentId + " <>",
                value, "sysDepartmentId");

            return this;
        }

        public Criteria andSysDepartmentIdNotEqualToOrIsNull(long value) {
            return andSysDepartmentIdNotEqualToOrIsNull(Long.valueOf(value));
        }

        public Criteria andSysDepartmentIdNotEqualToOrIsNull(
            java.lang.Long value) {
            addCriterion(ISysUserDepartmentRelateDAO.SysDepartmentId +
                " is null OR " + ISysUserDepartmentRelateDAO.SysDepartmentId +
                " <>", value, "sysDepartmentId");

            return this;
        }

        public Criteria andSysDepartmentIdNotEqualToForeignKey(
            java.lang.String key) {
            StringBuffer str = new StringBuffer(ISysUserDepartmentRelateDAO.SysDepartmentId);
            str.append(" <> ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andSysDepartmentIdNotEqualTo(
            BaseQueryBean subQueryBean, IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysUserDepartmentRelateDAO.SysDepartmentId + " <> ",
                subQueryBean, dao);

            return this;
        }

        public Criteria andSysDepartmentIdGreaterThan(long value) {
            return andSysDepartmentIdGreaterThan(Long.valueOf(value));
        }

        public Criteria andSysDepartmentIdGreaterThan(java.lang.Long value) {
            addCriterion(ISysUserDepartmentRelateDAO.SysDepartmentId + " >",
                value, "sysDepartmentId");

            return this;
        }

        public Criteria andSysDepartmentIdGreaterThanForeignKey(
            java.lang.String key) {
            StringBuffer str = new StringBuffer(ISysUserDepartmentRelateDAO.SysDepartmentId);
            str.append(" > ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andSysDepartmentIdGreaterThan(
            BaseQueryBean subQueryBean, IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysUserDepartmentRelateDAO.SysDepartmentId + " > ",
                subQueryBean, dao);

            return this;
        }

        public Criteria andSysDepartmentIdGreaterThanOrEqualTo(long value) {
            return andSysDepartmentIdGreaterThanOrEqualTo(Long.valueOf(value));
        }

        public Criteria andSysDepartmentIdGreaterThanOrEqualTo(
            java.lang.Long value) {
            addCriterion(ISysUserDepartmentRelateDAO.SysDepartmentId + " >=",
                value, "sysDepartmentId");

            return this;
        }

        public Criteria andSysDepartmentIdGreaterThanOrEqualToForeignKey(
            java.lang.String key) {
            StringBuffer str = new StringBuffer(ISysUserDepartmentRelateDAO.SysDepartmentId);
            str.append(" >= ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andSysDepartmentIdGreaterThanOrEqualTo(
            BaseQueryBean subQueryBean, IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysUserDepartmentRelateDAO.SysDepartmentId + " >= ",
                subQueryBean, dao);

            return this;
        }

        public Criteria andSysDepartmentIdLessThan(long value) {
            return andSysDepartmentIdLessThan(Long.valueOf(value));
        }

        public Criteria andSysDepartmentIdLessThan(java.lang.Long value) {
            addCriterion(ISysUserDepartmentRelateDAO.SysDepartmentId + " <",
                value, "sysDepartmentId");

            return this;
        }

        public Criteria andSysDepartmentIdLessThanForeignKey(
            java.lang.String key) {
            StringBuffer str = new StringBuffer(ISysUserDepartmentRelateDAO.SysDepartmentId);
            str.append(" < ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andSysDepartmentIdLessThan(BaseQueryBean subQueryBean,
            IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysUserDepartmentRelateDAO.SysDepartmentId + " < ",
                subQueryBean, dao);

            return this;
        }

        public Criteria andSysDepartmentIdLessThanOrEqualTo(long value) {
            return andSysDepartmentIdLessThanOrEqualTo(Long.valueOf(value));
        }

        public Criteria andSysDepartmentIdLessThanOrEqualTo(
            java.lang.Long value) {
            addCriterion(ISysUserDepartmentRelateDAO.SysDepartmentId + " <=",
                value, "sysDepartmentId");

            return this;
        }

        public Criteria andSysDepartmentIdLessThanOrEqualToForeignKey(
            java.lang.String key) {
            StringBuffer str = new StringBuffer(ISysUserDepartmentRelateDAO.SysDepartmentId);
            str.append(" <= ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andSysDepartmentIdLessThanOrEqualTo(
            BaseQueryBean subQueryBean, IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysUserDepartmentRelateDAO.SysDepartmentId + " <= ",
                subQueryBean, dao);

            return this;
        }

        public Criteria andSysDepartmentIdIn(long[] values) {
            if (values.length == 1) {
                return andSysDepartmentIdEqualTo((java.lang.Long) values[0]);
            } else {
                addCriterion(ISysUserDepartmentRelateDAO.SysDepartmentId +
                    " in", values, "sysDepartmentId");

                return this;
            }
        }

        public Criteria andSysDepartmentIdNotIn(long[] values) {
            if (values.length == 1) {
                return andSysDepartmentIdNotEqualTo((java.lang.Long) values[0]);
            } else {
                addCriterion(ISysUserDepartmentRelateDAO.SysDepartmentId +
                    " not in", values, "sysDepartmentId");

                return this;
            }
        }

        public Criteria andSysDepartmentIdIn(List<java.lang.Long> values) {
            if (values.size() == 1) {
                return andSysDepartmentIdEqualTo(values.get(0));
            } else {
                addCriterion(ISysUserDepartmentRelateDAO.SysDepartmentId +
                    " in", values, "sysDepartmentId");

                return this;
            }
        }

        public Criteria andSysDepartmentIdNotIn(List<java.lang.Long> values) {
            if (values.size() == 1) {
                return andSysDepartmentIdNotEqualTo(values.get(0));
            } else {
                addCriterion(ISysUserDepartmentRelateDAO.SysDepartmentId +
                    " not in", values, "sysDepartmentId");

                return this;
            }
        }

        public Criteria andSysDepartmentIdIn(java.lang.Long[] values) {
            if (values.length == 1) {
                return andSysDepartmentIdEqualTo(values[0]);
            } else {
                addCriterion(ISysUserDepartmentRelateDAO.SysDepartmentId +
                    " in", Arrays.asList(values), "sysDepartmentId");

                return this;
            }
        }

        public Criteria andSysDepartmentIdNotIn(java.lang.Long[] values) {
            if (values.length == 1) {
                return andSysDepartmentIdNotEqualTo(values[0]);
            } else {
                addCriterion(ISysUserDepartmentRelateDAO.SysDepartmentId +
                    " not in", Arrays.asList(values), "sysDepartmentId");

                return this;
            }
        }

        public Criteria andSysDepartmentIdIn(BaseQueryBean subQueryBean,
            IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysUserDepartmentRelateDAO.SysDepartmentId + " in ",
                subQueryBean, dao);

            return this;
        }

        public Criteria andSysDepartmentIdNotIn(BaseQueryBean subQueryBean,
            IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysUserDepartmentRelateDAO.SysDepartmentId +
                " not in ", subQueryBean, dao);

            return this;
        }

        public Criteria andSysDepartmentIdBetween(long value1, long value2) {
            addCriterion(ISysUserDepartmentRelateDAO.SysDepartmentId +
                " between", value1, value2, "sysDepartmentId");

            return this;
        }

        public Criteria andSysDepartmentIdBetween(java.lang.Long value1,
            java.lang.Long value2) {
            addCriterion(ISysUserDepartmentRelateDAO.SysDepartmentId +
                " between", value1, value2, "sysDepartmentId");

            return this;
        }

        public Criteria andSysDepartmentIdNotBetween(long value1, long value2) {
            addCriterion(ISysUserDepartmentRelateDAO.SysDepartmentId +
                " not between", value1, value2, "sysDepartmentId");

            return this;
        }

        public Criteria andSysDepartmentIdNotBetween(java.lang.Long value1,
            java.lang.Long value2) {
            addCriterion(ISysUserDepartmentRelateDAO.SysDepartmentId +
                " not between", value1, value2, "sysDepartmentId");

            return this;
        }

        public Criteria andDepartmentRoleIsNull() {
            addCriterion(ISysUserDepartmentRelateDAO.DepartmentRole +
                " is null");

            return this;
        }

        public Criteria andDepartmentRoleIsNotNull() {
            addCriterion(ISysUserDepartmentRelateDAO.DepartmentRole +
                " is not null");

            return this;
        }

        public Criteria andDepartmentRoleIsNotEmpty() {
            addCriterion(ISysUserDepartmentRelateDAO.DepartmentRole +
                " is not null AND " +
                ISysUserDepartmentRelateDAO.DepartmentRole + " <> ''");

            return this;
        }

        public Criteria andDepartmentRoleIsEmpty() {
            addCriterion("(" + ISysUserDepartmentRelateDAO.DepartmentRole +
                " is null OR " + ISysUserDepartmentRelateDAO.DepartmentRole +
                " = '')");

            return this;
        }

        public Criteria andDepartmentRoleEqualTo(String value) {
            addCriterion(ISysUserDepartmentRelateDAO.DepartmentRole + " = ",
                value, "departmentRole");

            return this;
        }

        public Criteria andDepartmentRoleEqualToForeignKey(java.lang.String key) {
            StringBuffer str = new StringBuffer(ISysUserDepartmentRelateDAO.DepartmentRole);
            str.append(" = ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andDepartmentRoleEqualTo(BaseQueryBean subQueryBean,
            IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysUserDepartmentRelateDAO.DepartmentRole + " = ",
                subQueryBean, dao);

            return this;
        }

        public Criteria andDepartmentRoleNotEqualTo(String value) {
            addCriterion(ISysUserDepartmentRelateDAO.DepartmentRole + " <>",
                value, "departmentRole");

            return this;
        }

        public Criteria andDepartmentRoleNotEqualToOrIsNull(String value) {
            addCriterion(ISysUserDepartmentRelateDAO.DepartmentRole +
                " is null OR " + ISysUserDepartmentRelateDAO.DepartmentRole +
                " <>", value, "departmentRole");

            return this;
        }

        public Criteria andDepartmentRoleNotEqualToForeignKey(
            java.lang.String key) {
            StringBuffer str = new StringBuffer(ISysUserDepartmentRelateDAO.DepartmentRole);
            str.append(" <> ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andDepartmentRoleNotEqualTo(
            BaseQueryBean subQueryBean, IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysUserDepartmentRelateDAO.DepartmentRole + " <> ",
                subQueryBean, dao);

            return this;
        }

        public Criteria andDepartmentRoleGreaterThan(String value) {
            addCriterion(ISysUserDepartmentRelateDAO.DepartmentRole + " >",
                value, "departmentRole");

            return this;
        }

        public Criteria andDepartmentRoleGreaterThanForeignKey(
            java.lang.String key) {
            StringBuffer str = new StringBuffer(ISysUserDepartmentRelateDAO.DepartmentRole);
            str.append(" > ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andDepartmentRoleGreaterThan(
            BaseQueryBean subQueryBean, IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysUserDepartmentRelateDAO.DepartmentRole + " > ",
                subQueryBean, dao);

            return this;
        }

        public Criteria andDepartmentRoleGreaterThanOrEqualTo(String value) {
            addCriterion(ISysUserDepartmentRelateDAO.DepartmentRole + " >=",
                value, "departmentRole");

            return this;
        }

        public Criteria andDepartmentRoleGreaterThanOrEqualToForeignKey(
            java.lang.String key) {
            StringBuffer str = new StringBuffer(ISysUserDepartmentRelateDAO.DepartmentRole);
            str.append(" >= ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andDepartmentRoleGreaterThanOrEqualTo(
            BaseQueryBean subQueryBean, IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysUserDepartmentRelateDAO.DepartmentRole + " >= ",
                subQueryBean, dao);

            return this;
        }

        public Criteria andDepartmentRoleLessThan(String value) {
            addCriterion(ISysUserDepartmentRelateDAO.DepartmentRole + " <",
                value, "departmentRole");

            return this;
        }

        public Criteria andDepartmentRoleLessThanForeignKey(
            java.lang.String key) {
            StringBuffer str = new StringBuffer(ISysUserDepartmentRelateDAO.DepartmentRole);
            str.append(" < ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andDepartmentRoleLessThan(BaseQueryBean subQueryBean,
            IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysUserDepartmentRelateDAO.DepartmentRole + " < ",
                subQueryBean, dao);

            return this;
        }

        public Criteria andDepartmentRoleLessThanOrEqualTo(String value) {
            addCriterion(ISysUserDepartmentRelateDAO.DepartmentRole + " <=",
                value, "departmentRole");

            return this;
        }

        public Criteria andDepartmentRoleLessThanOrEqualToForeignKey(
            java.lang.String key) {
            StringBuffer str = new StringBuffer(ISysUserDepartmentRelateDAO.DepartmentRole);
            str.append(" <= ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andDepartmentRoleLessThanOrEqualTo(
            BaseQueryBean subQueryBean, IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysUserDepartmentRelateDAO.DepartmentRole + " <= ",
                subQueryBean, dao);

            return this;
        }

        public Criteria andDepartmentRoleLike(String value) {
            StringBuffer buffer = new StringBuffer("%");
            buffer.append(value);
            buffer.append("%");
            addCriterion(ISysUserDepartmentRelateDAO.DepartmentRole + " like",
                buffer.toString(), "departmentRole");

            return this;
        }

        public Criteria andDepartmentRoleNotLike(String value) {
            StringBuffer buffer = new StringBuffer("%");
            buffer.append(value);
            buffer.append("%");
            addCriterion(ISysUserDepartmentRelateDAO.DepartmentRole +
                " not like", buffer.toString(), "departmentRole");

            return this;
        }

        public Criteria andDepartmentRoleIn(List<String> values) {
            if (values.size() == 1) {
                return andDepartmentRoleEqualTo(values.get(0));
            } else {
                addCriterion(ISysUserDepartmentRelateDAO.DepartmentRole +
                    " in", values, "departmentRole");

                return this;
            }
        }

        public Criteria andDepartmentRoleNotIn(List<String> values) {
            if (values.size() == 1) {
                return andDepartmentRoleNotEqualTo(values.get(0));
            } else {
                addCriterion(ISysUserDepartmentRelateDAO.DepartmentRole +
                    " not in", values, "departmentRole");

                return this;
            }
        }

        public Criteria andDepartmentRoleIn(String[] values) {
            if (values.length == 1) {
                return andDepartmentRoleEqualTo(values[0]);
            } else {
                addCriterion(ISysUserDepartmentRelateDAO.DepartmentRole +
                    " in", Arrays.asList(values), "departmentRole");

                return this;
            }
        }

        public Criteria andDepartmentRoleNotIn(String[] values) {
            if (values.length == 1) {
                return andDepartmentRoleNotEqualTo(values[0]);
            } else {
                addCriterion(ISysUserDepartmentRelateDAO.DepartmentRole +
                    " not in", Arrays.asList(values), "departmentRole");

                return this;
            }
        }

        public Criteria andDepartmentRoleIn(BaseQueryBean subQueryBean,
            IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysUserDepartmentRelateDAO.DepartmentRole + " in ",
                subQueryBean, dao);

            return this;
        }

        public Criteria andDepartmentRoleNotIn(BaseQueryBean subQueryBean,
            IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysUserDepartmentRelateDAO.DepartmentRole +
                " not in ", subQueryBean, dao);

            return this;
        }

        public Criteria andDepartmentRoleBetween(String value1, String value2) {
            addCriterion(ISysUserDepartmentRelateDAO.DepartmentRole +
                " between", value1, value2, "departmentRole");

            return this;
        }

        public Criteria andDepartmentRoleNotBetween(String value1, String value2) {
            addCriterion(ISysUserDepartmentRelateDAO.DepartmentRole +
                " not between", value1, value2, "departmentRole");

            return this;
        }

        public Criteria andStatusIsNull() {
            addCriterion(ISysUserDepartmentRelateDAO.Status + " is null");

            return this;
        }

        public Criteria andStatusIsNotNull() {
            addCriterion(ISysUserDepartmentRelateDAO.Status + " is not null");

            return this;
        }

        public Criteria andStatusIsNotEmpty() {
            addCriterion(ISysUserDepartmentRelateDAO.Status +
                " is not null AND " + ISysUserDepartmentRelateDAO.Status +
                " <> ''");

            return this;
        }

        public Criteria andStatusIsEmpty() {
            addCriterion("(" + ISysUserDepartmentRelateDAO.Status +
                " is null OR " + ISysUserDepartmentRelateDAO.Status + " = '')");

            return this;
        }

        public Criteria andStatusEqualTo(String value) {
            addCriterion(ISysUserDepartmentRelateDAO.Status + " = ", value,
                "status");

            return this;
        }

        public Criteria andStatusEqualToForeignKey(java.lang.String key) {
            StringBuffer str = new StringBuffer(ISysUserDepartmentRelateDAO.Status);
            str.append(" = ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andStatusEqualTo(BaseQueryBean subQueryBean,
            IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysUserDepartmentRelateDAO.Status + " = ",
                subQueryBean, dao);

            return this;
        }

        public Criteria andStatusNotEqualTo(String value) {
            addCriterion(ISysUserDepartmentRelateDAO.Status + " <>", value,
                "status");

            return this;
        }

        public Criteria andStatusNotEqualToOrIsNull(String value) {
            addCriterion(ISysUserDepartmentRelateDAO.Status + " is null OR " +
                ISysUserDepartmentRelateDAO.Status + " <>", value, "status");

            return this;
        }

        public Criteria andStatusNotEqualToForeignKey(java.lang.String key) {
            StringBuffer str = new StringBuffer(ISysUserDepartmentRelateDAO.Status);
            str.append(" <> ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andStatusNotEqualTo(BaseQueryBean subQueryBean,
            IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysUserDepartmentRelateDAO.Status + " <> ",
                subQueryBean, dao);

            return this;
        }

        public Criteria andStatusGreaterThan(String value) {
            addCriterion(ISysUserDepartmentRelateDAO.Status + " >", value,
                "status");

            return this;
        }

        public Criteria andStatusGreaterThanForeignKey(java.lang.String key) {
            StringBuffer str = new StringBuffer(ISysUserDepartmentRelateDAO.Status);
            str.append(" > ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andStatusGreaterThan(BaseQueryBean subQueryBean,
            IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysUserDepartmentRelateDAO.Status + " > ",
                subQueryBean, dao);

            return this;
        }

        public Criteria andStatusGreaterThanOrEqualTo(String value) {
            addCriterion(ISysUserDepartmentRelateDAO.Status + " >=", value,
                "status");

            return this;
        }

        public Criteria andStatusGreaterThanOrEqualToForeignKey(
            java.lang.String key) {
            StringBuffer str = new StringBuffer(ISysUserDepartmentRelateDAO.Status);
            str.append(" >= ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andStatusGreaterThanOrEqualTo(
            BaseQueryBean subQueryBean, IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysUserDepartmentRelateDAO.Status + " >= ",
                subQueryBean, dao);

            return this;
        }

        public Criteria andStatusLessThan(String value) {
            addCriterion(ISysUserDepartmentRelateDAO.Status + " <", value,
                "status");

            return this;
        }

        public Criteria andStatusLessThanForeignKey(java.lang.String key) {
            StringBuffer str = new StringBuffer(ISysUserDepartmentRelateDAO.Status);
            str.append(" < ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andStatusLessThan(BaseQueryBean subQueryBean,
            IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysUserDepartmentRelateDAO.Status + " < ",
                subQueryBean, dao);

            return this;
        }

        public Criteria andStatusLessThanOrEqualTo(String value) {
            addCriterion(ISysUserDepartmentRelateDAO.Status + " <=", value,
                "status");

            return this;
        }

        public Criteria andStatusLessThanOrEqualToForeignKey(
            java.lang.String key) {
            StringBuffer str = new StringBuffer(ISysUserDepartmentRelateDAO.Status);
            str.append(" <= ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andStatusLessThanOrEqualTo(BaseQueryBean subQueryBean,
            IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysUserDepartmentRelateDAO.Status + " <= ",
                subQueryBean, dao);

            return this;
        }

        public Criteria andStatusLike(String value) {
            StringBuffer buffer = new StringBuffer("%");
            buffer.append(value);
            buffer.append("%");
            addCriterion(ISysUserDepartmentRelateDAO.Status + " like",
                buffer.toString(), "status");

            return this;
        }

        public Criteria andStatusNotLike(String value) {
            StringBuffer buffer = new StringBuffer("%");
            buffer.append(value);
            buffer.append("%");
            addCriterion(ISysUserDepartmentRelateDAO.Status + " not like",
                buffer.toString(), "status");

            return this;
        }

        public Criteria andStatusIn(List<String> values) {
            if (values.size() == 1) {
                return andStatusEqualTo(values.get(0));
            } else {
                addCriterion(ISysUserDepartmentRelateDAO.Status + " in",
                    values, "status");

                return this;
            }
        }

        public Criteria andStatusNotIn(List<String> values) {
            if (values.size() == 1) {
                return andStatusNotEqualTo(values.get(0));
            } else {
                addCriterion(ISysUserDepartmentRelateDAO.Status + " not in",
                    values, "status");

                return this;
            }
        }

        public Criteria andStatusIn(String[] values) {
            if (values.length == 1) {
                return andStatusEqualTo(values[0]);
            } else {
                addCriterion(ISysUserDepartmentRelateDAO.Status + " in",
                    Arrays.asList(values), "status");

                return this;
            }
        }

        public Criteria andStatusNotIn(String[] values) {
            if (values.length == 1) {
                return andStatusNotEqualTo(values[0]);
            } else {
                addCriterion(ISysUserDepartmentRelateDAO.Status + " not in",
                    Arrays.asList(values), "status");

                return this;
            }
        }

        public Criteria andStatusIn(BaseQueryBean subQueryBean,
            IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysUserDepartmentRelateDAO.Status + " in ",
                subQueryBean, dao);

            return this;
        }

        public Criteria andStatusNotIn(BaseQueryBean subQueryBean,
            IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysUserDepartmentRelateDAO.Status + " not in ",
                subQueryBean, dao);

            return this;
        }

        public Criteria andStatusBetween(String value1, String value2) {
            addCriterion(ISysUserDepartmentRelateDAO.Status + " between",
                value1, value2, "status");

            return this;
        }

        public Criteria andStatusNotBetween(String value1, String value2) {
            addCriterion(ISysUserDepartmentRelateDAO.Status + " not between",
                value1, value2, "status");

            return this;
        }

        public Criteria andSysUserNameIsNull() {
            addCriterion(ISysUserDepartmentRelateDAO.SysUserName + " is null");

            return this;
        }

        public Criteria andSysUserNameIsNotNull() {
            addCriterion(ISysUserDepartmentRelateDAO.SysUserName +
                " is not null");

            return this;
        }

        public Criteria andSysUserNameIsNotEmpty() {
            addCriterion(ISysUserDepartmentRelateDAO.SysUserName +
                " is not null AND " + ISysUserDepartmentRelateDAO.SysUserName +
                " <> ''");

            return this;
        }

        public Criteria andSysUserNameIsEmpty() {
            addCriterion("(" + ISysUserDepartmentRelateDAO.SysUserName +
                " is null OR " + ISysUserDepartmentRelateDAO.SysUserName +
                " = '')");

            return this;
        }

        public Criteria andSysUserNameEqualTo(String value) {
            addCriterion(ISysUserDepartmentRelateDAO.SysUserName + " = ",
                value, "sysUserName");

            return this;
        }

        public Criteria andSysUserNameEqualToForeignKey(java.lang.String key) {
            StringBuffer str = new StringBuffer(ISysUserDepartmentRelateDAO.SysUserName);
            str.append(" = ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andSysUserNameEqualTo(BaseQueryBean subQueryBean,
            IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysUserDepartmentRelateDAO.SysUserName + " = ",
                subQueryBean, dao);

            return this;
        }

        public Criteria andSysUserNameNotEqualTo(String value) {
            addCriterion(ISysUserDepartmentRelateDAO.SysUserName + " <>",
                value, "sysUserName");

            return this;
        }

        public Criteria andSysUserNameNotEqualToOrIsNull(String value) {
            addCriterion(ISysUserDepartmentRelateDAO.SysUserName +
                " is null OR " + ISysUserDepartmentRelateDAO.SysUserName +
                " <>", value, "sysUserName");

            return this;
        }

        public Criteria andSysUserNameNotEqualToForeignKey(java.lang.String key) {
            StringBuffer str = new StringBuffer(ISysUserDepartmentRelateDAO.SysUserName);
            str.append(" <> ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andSysUserNameNotEqualTo(BaseQueryBean subQueryBean,
            IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysUserDepartmentRelateDAO.SysUserName + " <> ",
                subQueryBean, dao);

            return this;
        }

        public Criteria andSysUserNameGreaterThan(String value) {
            addCriterion(ISysUserDepartmentRelateDAO.SysUserName + " >", value,
                "sysUserName");

            return this;
        }

        public Criteria andSysUserNameGreaterThanForeignKey(
            java.lang.String key) {
            StringBuffer str = new StringBuffer(ISysUserDepartmentRelateDAO.SysUserName);
            str.append(" > ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andSysUserNameGreaterThan(BaseQueryBean subQueryBean,
            IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysUserDepartmentRelateDAO.SysUserName + " > ",
                subQueryBean, dao);

            return this;
        }

        public Criteria andSysUserNameGreaterThanOrEqualTo(String value) {
            addCriterion(ISysUserDepartmentRelateDAO.SysUserName + " >=",
                value, "sysUserName");

            return this;
        }

        public Criteria andSysUserNameGreaterThanOrEqualToForeignKey(
            java.lang.String key) {
            StringBuffer str = new StringBuffer(ISysUserDepartmentRelateDAO.SysUserName);
            str.append(" >= ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andSysUserNameGreaterThanOrEqualTo(
            BaseQueryBean subQueryBean, IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysUserDepartmentRelateDAO.SysUserName + " >= ",
                subQueryBean, dao);

            return this;
        }

        public Criteria andSysUserNameLessThan(String value) {
            addCriterion(ISysUserDepartmentRelateDAO.SysUserName + " <", value,
                "sysUserName");

            return this;
        }

        public Criteria andSysUserNameLessThanForeignKey(java.lang.String key) {
            StringBuffer str = new StringBuffer(ISysUserDepartmentRelateDAO.SysUserName);
            str.append(" < ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andSysUserNameLessThan(BaseQueryBean subQueryBean,
            IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysUserDepartmentRelateDAO.SysUserName + " < ",
                subQueryBean, dao);

            return this;
        }

        public Criteria andSysUserNameLessThanOrEqualTo(String value) {
            addCriterion(ISysUserDepartmentRelateDAO.SysUserName + " <=",
                value, "sysUserName");

            return this;
        }

        public Criteria andSysUserNameLessThanOrEqualToForeignKey(
            java.lang.String key) {
            StringBuffer str = new StringBuffer(ISysUserDepartmentRelateDAO.SysUserName);
            str.append(" <= ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andSysUserNameLessThanOrEqualTo(
            BaseQueryBean subQueryBean, IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysUserDepartmentRelateDAO.SysUserName + " <= ",
                subQueryBean, dao);

            return this;
        }

        public Criteria andSysUserNameLike(String value) {
            StringBuffer buffer = new StringBuffer("%");
            buffer.append(value);
            buffer.append("%");
            addCriterion(ISysUserDepartmentRelateDAO.SysUserName + " like",
                buffer.toString(), "sysUserName");

            return this;
        }

        public Criteria andSysUserNameNotLike(String value) {
            StringBuffer buffer = new StringBuffer("%");
            buffer.append(value);
            buffer.append("%");
            addCriterion(ISysUserDepartmentRelateDAO.SysUserName + " not like",
                buffer.toString(), "sysUserName");

            return this;
        }

        public Criteria andSysUserNameIn(List<String> values) {
            if (values.size() == 1) {
                return andSysUserNameEqualTo(values.get(0));
            } else {
                addCriterion(ISysUserDepartmentRelateDAO.SysUserName + " in",
                    values, "sysUserName");

                return this;
            }
        }

        public Criteria andSysUserNameNotIn(List<String> values) {
            if (values.size() == 1) {
                return andSysUserNameNotEqualTo(values.get(0));
            } else {
                addCriterion(ISysUserDepartmentRelateDAO.SysUserName +
                    " not in", values, "sysUserName");

                return this;
            }
        }

        public Criteria andSysUserNameIn(String[] values) {
            if (values.length == 1) {
                return andSysUserNameEqualTo(values[0]);
            } else {
                addCriterion(ISysUserDepartmentRelateDAO.SysUserName + " in",
                    Arrays.asList(values), "sysUserName");

                return this;
            }
        }

        public Criteria andSysUserNameNotIn(String[] values) {
            if (values.length == 1) {
                return andSysUserNameNotEqualTo(values[0]);
            } else {
                addCriterion(ISysUserDepartmentRelateDAO.SysUserName +
                    " not in", Arrays.asList(values), "sysUserName");

                return this;
            }
        }

        public Criteria andSysUserNameIn(BaseQueryBean subQueryBean,
            IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysUserDepartmentRelateDAO.SysUserName + " in ",
                subQueryBean, dao);

            return this;
        }

        public Criteria andSysUserNameNotIn(BaseQueryBean subQueryBean,
            IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysUserDepartmentRelateDAO.SysUserName + " not in ",
                subQueryBean, dao);

            return this;
        }

        public Criteria andSysUserNameBetween(String value1, String value2) {
            addCriterion(ISysUserDepartmentRelateDAO.SysUserName + " between",
                value1, value2, "sysUserName");

            return this;
        }

        public Criteria andSysUserNameNotBetween(String value1, String value2) {
            addCriterion(ISysUserDepartmentRelateDAO.SysUserName +
                " not between", value1, value2, "sysUserName");

            return this;
        }

        public Criteria andSysUserAccountIsNull() {
            addCriterion(ISysUserDepartmentRelateDAO.SysUserAccount +
                " is null");

            return this;
        }

        public Criteria andSysUserAccountIsNotNull() {
            addCriterion(ISysUserDepartmentRelateDAO.SysUserAccount +
                " is not null");

            return this;
        }

        public Criteria andSysUserAccountIsNotEmpty() {
            addCriterion(ISysUserDepartmentRelateDAO.SysUserAccount +
                " is not null AND " +
                ISysUserDepartmentRelateDAO.SysUserAccount + " <> ''");

            return this;
        }

        public Criteria andSysUserAccountIsEmpty() {
            addCriterion("(" + ISysUserDepartmentRelateDAO.SysUserAccount +
                " is null OR " + ISysUserDepartmentRelateDAO.SysUserAccount +
                " = '')");

            return this;
        }

        public Criteria andSysUserAccountEqualTo(String value) {
            addCriterion(ISysUserDepartmentRelateDAO.SysUserAccount + " = ",
                value, "sysUserAccount");

            return this;
        }

        public Criteria andSysUserAccountEqualToForeignKey(java.lang.String key) {
            StringBuffer str = new StringBuffer(ISysUserDepartmentRelateDAO.SysUserAccount);
            str.append(" = ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andSysUserAccountEqualTo(BaseQueryBean subQueryBean,
            IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysUserDepartmentRelateDAO.SysUserAccount + " = ",
                subQueryBean, dao);

            return this;
        }

        public Criteria andSysUserAccountNotEqualTo(String value) {
            addCriterion(ISysUserDepartmentRelateDAO.SysUserAccount + " <>",
                value, "sysUserAccount");

            return this;
        }

        public Criteria andSysUserAccountNotEqualToOrIsNull(String value) {
            addCriterion(ISysUserDepartmentRelateDAO.SysUserAccount +
                " is null OR " + ISysUserDepartmentRelateDAO.SysUserAccount +
                " <>", value, "sysUserAccount");

            return this;
        }

        public Criteria andSysUserAccountNotEqualToForeignKey(
            java.lang.String key) {
            StringBuffer str = new StringBuffer(ISysUserDepartmentRelateDAO.SysUserAccount);
            str.append(" <> ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andSysUserAccountNotEqualTo(
            BaseQueryBean subQueryBean, IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysUserDepartmentRelateDAO.SysUserAccount + " <> ",
                subQueryBean, dao);

            return this;
        }

        public Criteria andSysUserAccountGreaterThan(String value) {
            addCriterion(ISysUserDepartmentRelateDAO.SysUserAccount + " >",
                value, "sysUserAccount");

            return this;
        }

        public Criteria andSysUserAccountGreaterThanForeignKey(
            java.lang.String key) {
            StringBuffer str = new StringBuffer(ISysUserDepartmentRelateDAO.SysUserAccount);
            str.append(" > ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andSysUserAccountGreaterThan(
            BaseQueryBean subQueryBean, IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysUserDepartmentRelateDAO.SysUserAccount + " > ",
                subQueryBean, dao);

            return this;
        }

        public Criteria andSysUserAccountGreaterThanOrEqualTo(String value) {
            addCriterion(ISysUserDepartmentRelateDAO.SysUserAccount + " >=",
                value, "sysUserAccount");

            return this;
        }

        public Criteria andSysUserAccountGreaterThanOrEqualToForeignKey(
            java.lang.String key) {
            StringBuffer str = new StringBuffer(ISysUserDepartmentRelateDAO.SysUserAccount);
            str.append(" >= ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andSysUserAccountGreaterThanOrEqualTo(
            BaseQueryBean subQueryBean, IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysUserDepartmentRelateDAO.SysUserAccount + " >= ",
                subQueryBean, dao);

            return this;
        }

        public Criteria andSysUserAccountLessThan(String value) {
            addCriterion(ISysUserDepartmentRelateDAO.SysUserAccount + " <",
                value, "sysUserAccount");

            return this;
        }

        public Criteria andSysUserAccountLessThanForeignKey(
            java.lang.String key) {
            StringBuffer str = new StringBuffer(ISysUserDepartmentRelateDAO.SysUserAccount);
            str.append(" < ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andSysUserAccountLessThan(BaseQueryBean subQueryBean,
            IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysUserDepartmentRelateDAO.SysUserAccount + " < ",
                subQueryBean, dao);

            return this;
        }

        public Criteria andSysUserAccountLessThanOrEqualTo(String value) {
            addCriterion(ISysUserDepartmentRelateDAO.SysUserAccount + " <=",
                value, "sysUserAccount");

            return this;
        }

        public Criteria andSysUserAccountLessThanOrEqualToForeignKey(
            java.lang.String key) {
            StringBuffer str = new StringBuffer(ISysUserDepartmentRelateDAO.SysUserAccount);
            str.append(" <= ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andSysUserAccountLessThanOrEqualTo(
            BaseQueryBean subQueryBean, IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysUserDepartmentRelateDAO.SysUserAccount + " <= ",
                subQueryBean, dao);

            return this;
        }

        public Criteria andSysUserAccountLike(String value) {
            StringBuffer buffer = new StringBuffer("%");
            buffer.append(value);
            buffer.append("%");
            addCriterion(ISysUserDepartmentRelateDAO.SysUserAccount + " like",
                buffer.toString(), "sysUserAccount");

            return this;
        }

        public Criteria andSysUserAccountNotLike(String value) {
            StringBuffer buffer = new StringBuffer("%");
            buffer.append(value);
            buffer.append("%");
            addCriterion(ISysUserDepartmentRelateDAO.SysUserAccount +
                " not like", buffer.toString(), "sysUserAccount");

            return this;
        }

        public Criteria andSysUserAccountIn(List<String> values) {
            if (values.size() == 1) {
                return andSysUserAccountEqualTo(values.get(0));
            } else {
                addCriterion(ISysUserDepartmentRelateDAO.SysUserAccount +
                    " in", values, "sysUserAccount");

                return this;
            }
        }

        public Criteria andSysUserAccountNotIn(List<String> values) {
            if (values.size() == 1) {
                return andSysUserAccountNotEqualTo(values.get(0));
            } else {
                addCriterion(ISysUserDepartmentRelateDAO.SysUserAccount +
                    " not in", values, "sysUserAccount");

                return this;
            }
        }

        public Criteria andSysUserAccountIn(String[] values) {
            if (values.length == 1) {
                return andSysUserAccountEqualTo(values[0]);
            } else {
                addCriterion(ISysUserDepartmentRelateDAO.SysUserAccount +
                    " in", Arrays.asList(values), "sysUserAccount");

                return this;
            }
        }

        public Criteria andSysUserAccountNotIn(String[] values) {
            if (values.length == 1) {
                return andSysUserAccountNotEqualTo(values[0]);
            } else {
                addCriterion(ISysUserDepartmentRelateDAO.SysUserAccount +
                    " not in", Arrays.asList(values), "sysUserAccount");

                return this;
            }
        }

        public Criteria andSysUserAccountIn(BaseQueryBean subQueryBean,
            IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysUserDepartmentRelateDAO.SysUserAccount + " in ",
                subQueryBean, dao);

            return this;
        }

        public Criteria andSysUserAccountNotIn(BaseQueryBean subQueryBean,
            IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysUserDepartmentRelateDAO.SysUserAccount +
                " not in ", subQueryBean, dao);

            return this;
        }

        public Criteria andSysUserAccountBetween(String value1, String value2) {
            addCriterion(ISysUserDepartmentRelateDAO.SysUserAccount +
                " between", value1, value2, "sysUserAccount");

            return this;
        }

        public Criteria andSysUserAccountNotBetween(String value1, String value2) {
            addCriterion(ISysUserDepartmentRelateDAO.SysUserAccount +
                " not between", value1, value2, "sysUserAccount");

            return this;
        }

        public Criteria andSysUserRemarksIsNull() {
            addCriterion(ISysUserDepartmentRelateDAO.SysUserRemarks +
                " is null");

            return this;
        }

        public Criteria andSysUserRemarksIsNotNull() {
            addCriterion(ISysUserDepartmentRelateDAO.SysUserRemarks +
                " is not null");

            return this;
        }

        public Criteria andSysUserRemarksIsNotEmpty() {
            addCriterion(ISysUserDepartmentRelateDAO.SysUserRemarks +
                " is not null AND " +
                ISysUserDepartmentRelateDAO.SysUserRemarks + " <> ''");

            return this;
        }

        public Criteria andSysUserRemarksIsEmpty() {
            addCriterion("(" + ISysUserDepartmentRelateDAO.SysUserRemarks +
                " is null OR " + ISysUserDepartmentRelateDAO.SysUserRemarks +
                " = '')");

            return this;
        }

        public Criteria andSysUserRemarksEqualTo(String value) {
            addCriterion(ISysUserDepartmentRelateDAO.SysUserRemarks + " = ",
                value, "sysUserRemarks");

            return this;
        }

        public Criteria andSysUserRemarksEqualToForeignKey(java.lang.String key) {
            StringBuffer str = new StringBuffer(ISysUserDepartmentRelateDAO.SysUserRemarks);
            str.append(" = ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andSysUserRemarksEqualTo(BaseQueryBean subQueryBean,
            IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysUserDepartmentRelateDAO.SysUserRemarks + " = ",
                subQueryBean, dao);

            return this;
        }

        public Criteria andSysUserRemarksNotEqualTo(String value) {
            addCriterion(ISysUserDepartmentRelateDAO.SysUserRemarks + " <>",
                value, "sysUserRemarks");

            return this;
        }

        public Criteria andSysUserRemarksNotEqualToOrIsNull(String value) {
            addCriterion(ISysUserDepartmentRelateDAO.SysUserRemarks +
                " is null OR " + ISysUserDepartmentRelateDAO.SysUserRemarks +
                " <>", value, "sysUserRemarks");

            return this;
        }

        public Criteria andSysUserRemarksNotEqualToForeignKey(
            java.lang.String key) {
            StringBuffer str = new StringBuffer(ISysUserDepartmentRelateDAO.SysUserRemarks);
            str.append(" <> ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andSysUserRemarksNotEqualTo(
            BaseQueryBean subQueryBean, IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysUserDepartmentRelateDAO.SysUserRemarks + " <> ",
                subQueryBean, dao);

            return this;
        }

        public Criteria andSysUserRemarksGreaterThan(String value) {
            addCriterion(ISysUserDepartmentRelateDAO.SysUserRemarks + " >",
                value, "sysUserRemarks");

            return this;
        }

        public Criteria andSysUserRemarksGreaterThanForeignKey(
            java.lang.String key) {
            StringBuffer str = new StringBuffer(ISysUserDepartmentRelateDAO.SysUserRemarks);
            str.append(" > ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andSysUserRemarksGreaterThan(
            BaseQueryBean subQueryBean, IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysUserDepartmentRelateDAO.SysUserRemarks + " > ",
                subQueryBean, dao);

            return this;
        }

        public Criteria andSysUserRemarksGreaterThanOrEqualTo(String value) {
            addCriterion(ISysUserDepartmentRelateDAO.SysUserRemarks + " >=",
                value, "sysUserRemarks");

            return this;
        }

        public Criteria andSysUserRemarksGreaterThanOrEqualToForeignKey(
            java.lang.String key) {
            StringBuffer str = new StringBuffer(ISysUserDepartmentRelateDAO.SysUserRemarks);
            str.append(" >= ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andSysUserRemarksGreaterThanOrEqualTo(
            BaseQueryBean subQueryBean, IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysUserDepartmentRelateDAO.SysUserRemarks + " >= ",
                subQueryBean, dao);

            return this;
        }

        public Criteria andSysUserRemarksLessThan(String value) {
            addCriterion(ISysUserDepartmentRelateDAO.SysUserRemarks + " <",
                value, "sysUserRemarks");

            return this;
        }

        public Criteria andSysUserRemarksLessThanForeignKey(
            java.lang.String key) {
            StringBuffer str = new StringBuffer(ISysUserDepartmentRelateDAO.SysUserRemarks);
            str.append(" < ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andSysUserRemarksLessThan(BaseQueryBean subQueryBean,
            IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysUserDepartmentRelateDAO.SysUserRemarks + " < ",
                subQueryBean, dao);

            return this;
        }

        public Criteria andSysUserRemarksLessThanOrEqualTo(String value) {
            addCriterion(ISysUserDepartmentRelateDAO.SysUserRemarks + " <=",
                value, "sysUserRemarks");

            return this;
        }

        public Criteria andSysUserRemarksLessThanOrEqualToForeignKey(
            java.lang.String key) {
            StringBuffer str = new StringBuffer(ISysUserDepartmentRelateDAO.SysUserRemarks);
            str.append(" <= ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andSysUserRemarksLessThanOrEqualTo(
            BaseQueryBean subQueryBean, IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysUserDepartmentRelateDAO.SysUserRemarks + " <= ",
                subQueryBean, dao);

            return this;
        }

        public Criteria andSysUserRemarksLike(String value) {
            StringBuffer buffer = new StringBuffer("%");
            buffer.append(value);
            buffer.append("%");
            addCriterion(ISysUserDepartmentRelateDAO.SysUserRemarks + " like",
                buffer.toString(), "sysUserRemarks");

            return this;
        }

        public Criteria andSysUserRemarksNotLike(String value) {
            StringBuffer buffer = new StringBuffer("%");
            buffer.append(value);
            buffer.append("%");
            addCriterion(ISysUserDepartmentRelateDAO.SysUserRemarks +
                " not like", buffer.toString(), "sysUserRemarks");

            return this;
        }

        public Criteria andSysUserRemarksIn(List<String> values) {
            if (values.size() == 1) {
                return andSysUserRemarksEqualTo(values.get(0));
            } else {
                addCriterion(ISysUserDepartmentRelateDAO.SysUserRemarks +
                    " in", values, "sysUserRemarks");

                return this;
            }
        }

        public Criteria andSysUserRemarksNotIn(List<String> values) {
            if (values.size() == 1) {
                return andSysUserRemarksNotEqualTo(values.get(0));
            } else {
                addCriterion(ISysUserDepartmentRelateDAO.SysUserRemarks +
                    " not in", values, "sysUserRemarks");

                return this;
            }
        }

        public Criteria andSysUserRemarksIn(String[] values) {
            if (values.length == 1) {
                return andSysUserRemarksEqualTo(values[0]);
            } else {
                addCriterion(ISysUserDepartmentRelateDAO.SysUserRemarks +
                    " in", Arrays.asList(values), "sysUserRemarks");

                return this;
            }
        }

        public Criteria andSysUserRemarksNotIn(String[] values) {
            if (values.length == 1) {
                return andSysUserRemarksNotEqualTo(values[0]);
            } else {
                addCriterion(ISysUserDepartmentRelateDAO.SysUserRemarks +
                    " not in", Arrays.asList(values), "sysUserRemarks");

                return this;
            }
        }

        public Criteria andSysUserRemarksIn(BaseQueryBean subQueryBean,
            IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysUserDepartmentRelateDAO.SysUserRemarks + " in ",
                subQueryBean, dao);

            return this;
        }

        public Criteria andSysUserRemarksNotIn(BaseQueryBean subQueryBean,
            IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysUserDepartmentRelateDAO.SysUserRemarks +
                " not in ", subQueryBean, dao);

            return this;
        }

        public Criteria andSysUserRemarksBetween(String value1, String value2) {
            addCriterion(ISysUserDepartmentRelateDAO.SysUserRemarks +
                " between", value1, value2, "sysUserRemarks");

            return this;
        }

        public Criteria andSysUserRemarksNotBetween(String value1, String value2) {
            addCriterion(ISysUserDepartmentRelateDAO.SysUserRemarks +
                " not between", value1, value2, "sysUserRemarks");

            return this;
        }

        public Criteria andSysUserStatusIsNull() {
            addCriterion(ISysUserDepartmentRelateDAO.SysUserStatus +
                " is null");

            return this;
        }

        public Criteria andSysUserStatusIsNotNull() {
            addCriterion(ISysUserDepartmentRelateDAO.SysUserStatus +
                " is not null");

            return this;
        }

        public Criteria andSysUserStatusIsNotEmpty() {
            addCriterion(ISysUserDepartmentRelateDAO.SysUserStatus +
                " is not null AND " +
                ISysUserDepartmentRelateDAO.SysUserStatus + " <> ''");

            return this;
        }

        public Criteria andSysUserStatusIsEmpty() {
            addCriterion("(" + ISysUserDepartmentRelateDAO.SysUserStatus +
                " is null OR " + ISysUserDepartmentRelateDAO.SysUserStatus +
                " = '')");

            return this;
        }

        public Criteria andSysUserStatusEqualTo(String value) {
            addCriterion(ISysUserDepartmentRelateDAO.SysUserStatus + " = ",
                value, "sysUserStatus");

            return this;
        }

        public Criteria andSysUserStatusEqualToForeignKey(java.lang.String key) {
            StringBuffer str = new StringBuffer(ISysUserDepartmentRelateDAO.SysUserStatus);
            str.append(" = ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andSysUserStatusEqualTo(BaseQueryBean subQueryBean,
            IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysUserDepartmentRelateDAO.SysUserStatus + " = ",
                subQueryBean, dao);

            return this;
        }

        public Criteria andSysUserStatusNotEqualTo(String value) {
            addCriterion(ISysUserDepartmentRelateDAO.SysUserStatus + " <>",
                value, "sysUserStatus");

            return this;
        }

        public Criteria andSysUserStatusNotEqualToOrIsNull(String value) {
            addCriterion(ISysUserDepartmentRelateDAO.SysUserStatus +
                " is null OR " + ISysUserDepartmentRelateDAO.SysUserStatus +
                " <>", value, "sysUserStatus");

            return this;
        }

        public Criteria andSysUserStatusNotEqualToForeignKey(
            java.lang.String key) {
            StringBuffer str = new StringBuffer(ISysUserDepartmentRelateDAO.SysUserStatus);
            str.append(" <> ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andSysUserStatusNotEqualTo(BaseQueryBean subQueryBean,
            IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysUserDepartmentRelateDAO.SysUserStatus + " <> ",
                subQueryBean, dao);

            return this;
        }

        public Criteria andSysUserStatusGreaterThan(String value) {
            addCriterion(ISysUserDepartmentRelateDAO.SysUserStatus + " >",
                value, "sysUserStatus");

            return this;
        }

        public Criteria andSysUserStatusGreaterThanForeignKey(
            java.lang.String key) {
            StringBuffer str = new StringBuffer(ISysUserDepartmentRelateDAO.SysUserStatus);
            str.append(" > ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andSysUserStatusGreaterThan(
            BaseQueryBean subQueryBean, IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysUserDepartmentRelateDAO.SysUserStatus + " > ",
                subQueryBean, dao);

            return this;
        }

        public Criteria andSysUserStatusGreaterThanOrEqualTo(String value) {
            addCriterion(ISysUserDepartmentRelateDAO.SysUserStatus + " >=",
                value, "sysUserStatus");

            return this;
        }

        public Criteria andSysUserStatusGreaterThanOrEqualToForeignKey(
            java.lang.String key) {
            StringBuffer str = new StringBuffer(ISysUserDepartmentRelateDAO.SysUserStatus);
            str.append(" >= ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andSysUserStatusGreaterThanOrEqualTo(
            BaseQueryBean subQueryBean, IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysUserDepartmentRelateDAO.SysUserStatus + " >= ",
                subQueryBean, dao);

            return this;
        }

        public Criteria andSysUserStatusLessThan(String value) {
            addCriterion(ISysUserDepartmentRelateDAO.SysUserStatus + " <",
                value, "sysUserStatus");

            return this;
        }

        public Criteria andSysUserStatusLessThanForeignKey(java.lang.String key) {
            StringBuffer str = new StringBuffer(ISysUserDepartmentRelateDAO.SysUserStatus);
            str.append(" < ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andSysUserStatusLessThan(BaseQueryBean subQueryBean,
            IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysUserDepartmentRelateDAO.SysUserStatus + " < ",
                subQueryBean, dao);

            return this;
        }

        public Criteria andSysUserStatusLessThanOrEqualTo(String value) {
            addCriterion(ISysUserDepartmentRelateDAO.SysUserStatus + " <=",
                value, "sysUserStatus");

            return this;
        }

        public Criteria andSysUserStatusLessThanOrEqualToForeignKey(
            java.lang.String key) {
            StringBuffer str = new StringBuffer(ISysUserDepartmentRelateDAO.SysUserStatus);
            str.append(" <= ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andSysUserStatusLessThanOrEqualTo(
            BaseQueryBean subQueryBean, IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysUserDepartmentRelateDAO.SysUserStatus + " <= ",
                subQueryBean, dao);

            return this;
        }

        public Criteria andSysUserStatusLike(String value) {
            StringBuffer buffer = new StringBuffer("%");
            buffer.append(value);
            buffer.append("%");
            addCriterion(ISysUserDepartmentRelateDAO.SysUserStatus + " like",
                buffer.toString(), "sysUserStatus");

            return this;
        }

        public Criteria andSysUserStatusNotLike(String value) {
            StringBuffer buffer = new StringBuffer("%");
            buffer.append(value);
            buffer.append("%");
            addCriterion(ISysUserDepartmentRelateDAO.SysUserStatus +
                " not like", buffer.toString(), "sysUserStatus");

            return this;
        }

        public Criteria andSysUserStatusIn(List<String> values) {
            if (values.size() == 1) {
                return andSysUserStatusEqualTo(values.get(0));
            } else {
                addCriterion(ISysUserDepartmentRelateDAO.SysUserStatus + " in",
                    values, "sysUserStatus");

                return this;
            }
        }

        public Criteria andSysUserStatusNotIn(List<String> values) {
            if (values.size() == 1) {
                return andSysUserStatusNotEqualTo(values.get(0));
            } else {
                addCriterion(ISysUserDepartmentRelateDAO.SysUserStatus +
                    " not in", values, "sysUserStatus");

                return this;
            }
        }

        public Criteria andSysUserStatusIn(String[] values) {
            if (values.length == 1) {
                return andSysUserStatusEqualTo(values[0]);
            } else {
                addCriterion(ISysUserDepartmentRelateDAO.SysUserStatus + " in",
                    Arrays.asList(values), "sysUserStatus");

                return this;
            }
        }

        public Criteria andSysUserStatusNotIn(String[] values) {
            if (values.length == 1) {
                return andSysUserStatusNotEqualTo(values[0]);
            } else {
                addCriterion(ISysUserDepartmentRelateDAO.SysUserStatus +
                    " not in", Arrays.asList(values), "sysUserStatus");

                return this;
            }
        }

        public Criteria andSysUserStatusIn(BaseQueryBean subQueryBean,
            IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysUserDepartmentRelateDAO.SysUserStatus + " in ",
                subQueryBean, dao);

            return this;
        }

        public Criteria andSysUserStatusNotIn(BaseQueryBean subQueryBean,
            IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysUserDepartmentRelateDAO.SysUserStatus +
                " not in ", subQueryBean, dao);

            return this;
        }

        public Criteria andSysUserStatusBetween(String value1, String value2) {
            addCriterion(ISysUserDepartmentRelateDAO.SysUserStatus +
                " between", value1, value2, "sysUserStatus");

            return this;
        }

        public Criteria andSysUserStatusNotBetween(String value1, String value2) {
            addCriterion(ISysUserDepartmentRelateDAO.SysUserStatus +
                " not between", value1, value2, "sysUserStatus");

            return this;
        }

        public Criteria andSysUserMobilePhoneIsNull() {
            addCriterion(ISysUserDepartmentRelateDAO.SysUserMobilePhone +
                " is null");

            return this;
        }

        public Criteria andSysUserMobilePhoneIsNotNull() {
            addCriterion(ISysUserDepartmentRelateDAO.SysUserMobilePhone +
                " is not null");

            return this;
        }

        public Criteria andSysUserMobilePhoneIsNotEmpty() {
            addCriterion(ISysUserDepartmentRelateDAO.SysUserMobilePhone +
                " is not null AND " +
                ISysUserDepartmentRelateDAO.SysUserMobilePhone + " <> ''");

            return this;
        }

        public Criteria andSysUserMobilePhoneIsEmpty() {
            addCriterion("(" + ISysUserDepartmentRelateDAO.SysUserMobilePhone +
                " is null OR " +
                ISysUserDepartmentRelateDAO.SysUserMobilePhone + " = '')");

            return this;
        }

        public Criteria andSysUserMobilePhoneEqualTo(String value) {
            addCriterion(ISysUserDepartmentRelateDAO.SysUserMobilePhone +
                " = ", value, "sysUserMobilePhone");

            return this;
        }

        public Criteria andSysUserMobilePhoneEqualToForeignKey(
            java.lang.String key) {
            StringBuffer str = new StringBuffer(ISysUserDepartmentRelateDAO.SysUserMobilePhone);
            str.append(" = ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andSysUserMobilePhoneEqualTo(
            BaseQueryBean subQueryBean, IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysUserDepartmentRelateDAO.SysUserMobilePhone +
                " = ", subQueryBean, dao);

            return this;
        }

        public Criteria andSysUserMobilePhoneNotEqualTo(String value) {
            addCriterion(ISysUserDepartmentRelateDAO.SysUserMobilePhone +
                " <>", value, "sysUserMobilePhone");

            return this;
        }

        public Criteria andSysUserMobilePhoneNotEqualToOrIsNull(String value) {
            addCriterion(ISysUserDepartmentRelateDAO.SysUserMobilePhone +
                " is null OR " +
                ISysUserDepartmentRelateDAO.SysUserMobilePhone + " <>", value,
                "sysUserMobilePhone");

            return this;
        }

        public Criteria andSysUserMobilePhoneNotEqualToForeignKey(
            java.lang.String key) {
            StringBuffer str = new StringBuffer(ISysUserDepartmentRelateDAO.SysUserMobilePhone);
            str.append(" <> ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andSysUserMobilePhoneNotEqualTo(
            BaseQueryBean subQueryBean, IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysUserDepartmentRelateDAO.SysUserMobilePhone +
                " <> ", subQueryBean, dao);

            return this;
        }

        public Criteria andSysUserMobilePhoneGreaterThan(String value) {
            addCriterion(ISysUserDepartmentRelateDAO.SysUserMobilePhone + " >",
                value, "sysUserMobilePhone");

            return this;
        }

        public Criteria andSysUserMobilePhoneGreaterThanForeignKey(
            java.lang.String key) {
            StringBuffer str = new StringBuffer(ISysUserDepartmentRelateDAO.SysUserMobilePhone);
            str.append(" > ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andSysUserMobilePhoneGreaterThan(
            BaseQueryBean subQueryBean, IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysUserDepartmentRelateDAO.SysUserMobilePhone +
                " > ", subQueryBean, dao);

            return this;
        }

        public Criteria andSysUserMobilePhoneGreaterThanOrEqualTo(String value) {
            addCriterion(ISysUserDepartmentRelateDAO.SysUserMobilePhone +
                " >=", value, "sysUserMobilePhone");

            return this;
        }

        public Criteria andSysUserMobilePhoneGreaterThanOrEqualToForeignKey(
            java.lang.String key) {
            StringBuffer str = new StringBuffer(ISysUserDepartmentRelateDAO.SysUserMobilePhone);
            str.append(" >= ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andSysUserMobilePhoneGreaterThanOrEqualTo(
            BaseQueryBean subQueryBean, IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysUserDepartmentRelateDAO.SysUserMobilePhone +
                " >= ", subQueryBean, dao);

            return this;
        }

        public Criteria andSysUserMobilePhoneLessThan(String value) {
            addCriterion(ISysUserDepartmentRelateDAO.SysUserMobilePhone + " <",
                value, "sysUserMobilePhone");

            return this;
        }

        public Criteria andSysUserMobilePhoneLessThanForeignKey(
            java.lang.String key) {
            StringBuffer str = new StringBuffer(ISysUserDepartmentRelateDAO.SysUserMobilePhone);
            str.append(" < ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andSysUserMobilePhoneLessThan(
            BaseQueryBean subQueryBean, IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysUserDepartmentRelateDAO.SysUserMobilePhone +
                " < ", subQueryBean, dao);

            return this;
        }

        public Criteria andSysUserMobilePhoneLessThanOrEqualTo(String value) {
            addCriterion(ISysUserDepartmentRelateDAO.SysUserMobilePhone +
                " <=", value, "sysUserMobilePhone");

            return this;
        }

        public Criteria andSysUserMobilePhoneLessThanOrEqualToForeignKey(
            java.lang.String key) {
            StringBuffer str = new StringBuffer(ISysUserDepartmentRelateDAO.SysUserMobilePhone);
            str.append(" <= ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andSysUserMobilePhoneLessThanOrEqualTo(
            BaseQueryBean subQueryBean, IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysUserDepartmentRelateDAO.SysUserMobilePhone +
                " <= ", subQueryBean, dao);

            return this;
        }

        public Criteria andSysUserMobilePhoneLike(String value) {
            StringBuffer buffer = new StringBuffer("%");
            buffer.append(value);
            buffer.append("%");
            addCriterion(ISysUserDepartmentRelateDAO.SysUserMobilePhone +
                " like", buffer.toString(), "sysUserMobilePhone");

            return this;
        }

        public Criteria andSysUserMobilePhoneNotLike(String value) {
            StringBuffer buffer = new StringBuffer("%");
            buffer.append(value);
            buffer.append("%");
            addCriterion(ISysUserDepartmentRelateDAO.SysUserMobilePhone +
                " not like", buffer.toString(), "sysUserMobilePhone");

            return this;
        }

        public Criteria andSysUserMobilePhoneIn(List<String> values) {
            if (values.size() == 1) {
                return andSysUserMobilePhoneEqualTo(values.get(0));
            } else {
                addCriterion(ISysUserDepartmentRelateDAO.SysUserMobilePhone +
                    " in", values, "sysUserMobilePhone");

                return this;
            }
        }

        public Criteria andSysUserMobilePhoneNotIn(List<String> values) {
            if (values.size() == 1) {
                return andSysUserMobilePhoneNotEqualTo(values.get(0));
            } else {
                addCriterion(ISysUserDepartmentRelateDAO.SysUserMobilePhone +
                    " not in", values, "sysUserMobilePhone");

                return this;
            }
        }

        public Criteria andSysUserMobilePhoneIn(String[] values) {
            if (values.length == 1) {
                return andSysUserMobilePhoneEqualTo(values[0]);
            } else {
                addCriterion(ISysUserDepartmentRelateDAO.SysUserMobilePhone +
                    " in", Arrays.asList(values), "sysUserMobilePhone");

                return this;
            }
        }

        public Criteria andSysUserMobilePhoneNotIn(String[] values) {
            if (values.length == 1) {
                return andSysUserMobilePhoneNotEqualTo(values[0]);
            } else {
                addCriterion(ISysUserDepartmentRelateDAO.SysUserMobilePhone +
                    " not in", Arrays.asList(values), "sysUserMobilePhone");

                return this;
            }
        }

        public Criteria andSysUserMobilePhoneIn(BaseQueryBean subQueryBean,
            IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysUserDepartmentRelateDAO.SysUserMobilePhone +
                " in ", subQueryBean, dao);

            return this;
        }

        public Criteria andSysUserMobilePhoneNotIn(BaseQueryBean subQueryBean,
            IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysUserDepartmentRelateDAO.SysUserMobilePhone +
                " not in ", subQueryBean, dao);

            return this;
        }

        public Criteria andSysUserMobilePhoneBetween(String value1,
            String value2) {
            addCriterion(ISysUserDepartmentRelateDAO.SysUserMobilePhone +
                " between", value1, value2, "sysUserMobilePhone");

            return this;
        }

        public Criteria andSysUserMobilePhoneNotBetween(String value1,
            String value2) {
            addCriterion(ISysUserDepartmentRelateDAO.SysUserMobilePhone +
                " not between", value1, value2, "sysUserMobilePhone");

            return this;
        }

        public Criteria andDepartmentNameIsNull() {
            addCriterion(ISysUserDepartmentRelateDAO.DepartmentName +
                " is null");

            return this;
        }

        public Criteria andDepartmentNameIsNotNull() {
            addCriterion(ISysUserDepartmentRelateDAO.DepartmentName +
                " is not null");

            return this;
        }

        public Criteria andDepartmentNameIsNotEmpty() {
            addCriterion(ISysUserDepartmentRelateDAO.DepartmentName +
                " is not null AND " +
                ISysUserDepartmentRelateDAO.DepartmentName + " <> ''");

            return this;
        }

        public Criteria andDepartmentNameIsEmpty() {
            addCriterion("(" + ISysUserDepartmentRelateDAO.DepartmentName +
                " is null OR " + ISysUserDepartmentRelateDAO.DepartmentName +
                " = '')");

            return this;
        }

        public Criteria andDepartmentNameEqualTo(String value) {
            addCriterion(ISysUserDepartmentRelateDAO.DepartmentName + " = ",
                value, "departmentName");

            return this;
        }

        public Criteria andDepartmentNameEqualToForeignKey(java.lang.String key) {
            StringBuffer str = new StringBuffer(ISysUserDepartmentRelateDAO.DepartmentName);
            str.append(" = ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andDepartmentNameEqualTo(BaseQueryBean subQueryBean,
            IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysUserDepartmentRelateDAO.DepartmentName + " = ",
                subQueryBean, dao);

            return this;
        }

        public Criteria andDepartmentNameNotEqualTo(String value) {
            addCriterion(ISysUserDepartmentRelateDAO.DepartmentName + " <>",
                value, "departmentName");

            return this;
        }

        public Criteria andDepartmentNameNotEqualToOrIsNull(String value) {
            addCriterion(ISysUserDepartmentRelateDAO.DepartmentName +
                " is null OR " + ISysUserDepartmentRelateDAO.DepartmentName +
                " <>", value, "departmentName");

            return this;
        }

        public Criteria andDepartmentNameNotEqualToForeignKey(
            java.lang.String key) {
            StringBuffer str = new StringBuffer(ISysUserDepartmentRelateDAO.DepartmentName);
            str.append(" <> ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andDepartmentNameNotEqualTo(
            BaseQueryBean subQueryBean, IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysUserDepartmentRelateDAO.DepartmentName + " <> ",
                subQueryBean, dao);

            return this;
        }

        public Criteria andDepartmentNameGreaterThan(String value) {
            addCriterion(ISysUserDepartmentRelateDAO.DepartmentName + " >",
                value, "departmentName");

            return this;
        }

        public Criteria andDepartmentNameGreaterThanForeignKey(
            java.lang.String key) {
            StringBuffer str = new StringBuffer(ISysUserDepartmentRelateDAO.DepartmentName);
            str.append(" > ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andDepartmentNameGreaterThan(
            BaseQueryBean subQueryBean, IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysUserDepartmentRelateDAO.DepartmentName + " > ",
                subQueryBean, dao);

            return this;
        }

        public Criteria andDepartmentNameGreaterThanOrEqualTo(String value) {
            addCriterion(ISysUserDepartmentRelateDAO.DepartmentName + " >=",
                value, "departmentName");

            return this;
        }

        public Criteria andDepartmentNameGreaterThanOrEqualToForeignKey(
            java.lang.String key) {
            StringBuffer str = new StringBuffer(ISysUserDepartmentRelateDAO.DepartmentName);
            str.append(" >= ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andDepartmentNameGreaterThanOrEqualTo(
            BaseQueryBean subQueryBean, IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysUserDepartmentRelateDAO.DepartmentName + " >= ",
                subQueryBean, dao);

            return this;
        }

        public Criteria andDepartmentNameLessThan(String value) {
            addCriterion(ISysUserDepartmentRelateDAO.DepartmentName + " <",
                value, "departmentName");

            return this;
        }

        public Criteria andDepartmentNameLessThanForeignKey(
            java.lang.String key) {
            StringBuffer str = new StringBuffer(ISysUserDepartmentRelateDAO.DepartmentName);
            str.append(" < ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andDepartmentNameLessThan(BaseQueryBean subQueryBean,
            IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysUserDepartmentRelateDAO.DepartmentName + " < ",
                subQueryBean, dao);

            return this;
        }

        public Criteria andDepartmentNameLessThanOrEqualTo(String value) {
            addCriterion(ISysUserDepartmentRelateDAO.DepartmentName + " <=",
                value, "departmentName");

            return this;
        }

        public Criteria andDepartmentNameLessThanOrEqualToForeignKey(
            java.lang.String key) {
            StringBuffer str = new StringBuffer(ISysUserDepartmentRelateDAO.DepartmentName);
            str.append(" <= ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andDepartmentNameLessThanOrEqualTo(
            BaseQueryBean subQueryBean, IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysUserDepartmentRelateDAO.DepartmentName + " <= ",
                subQueryBean, dao);

            return this;
        }

        public Criteria andDepartmentNameLike(String value) {
            StringBuffer buffer = new StringBuffer("%");
            buffer.append(value);
            buffer.append("%");
            addCriterion(ISysUserDepartmentRelateDAO.DepartmentName + " like",
                buffer.toString(), "departmentName");

            return this;
        }

        public Criteria andDepartmentNameNotLike(String value) {
            StringBuffer buffer = new StringBuffer("%");
            buffer.append(value);
            buffer.append("%");
            addCriterion(ISysUserDepartmentRelateDAO.DepartmentName +
                " not like", buffer.toString(), "departmentName");

            return this;
        }

        public Criteria andDepartmentNameIn(List<String> values) {
            if (values.size() == 1) {
                return andDepartmentNameEqualTo(values.get(0));
            } else {
                addCriterion(ISysUserDepartmentRelateDAO.DepartmentName +
                    " in", values, "departmentName");

                return this;
            }
        }

        public Criteria andDepartmentNameNotIn(List<String> values) {
            if (values.size() == 1) {
                return andDepartmentNameNotEqualTo(values.get(0));
            } else {
                addCriterion(ISysUserDepartmentRelateDAO.DepartmentName +
                    " not in", values, "departmentName");

                return this;
            }
        }

        public Criteria andDepartmentNameIn(String[] values) {
            if (values.length == 1) {
                return andDepartmentNameEqualTo(values[0]);
            } else {
                addCriterion(ISysUserDepartmentRelateDAO.DepartmentName +
                    " in", Arrays.asList(values), "departmentName");

                return this;
            }
        }

        public Criteria andDepartmentNameNotIn(String[] values) {
            if (values.length == 1) {
                return andDepartmentNameNotEqualTo(values[0]);
            } else {
                addCriterion(ISysUserDepartmentRelateDAO.DepartmentName +
                    " not in", Arrays.asList(values), "departmentName");

                return this;
            }
        }

        public Criteria andDepartmentNameIn(BaseQueryBean subQueryBean,
            IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysUserDepartmentRelateDAO.DepartmentName + " in ",
                subQueryBean, dao);

            return this;
        }

        public Criteria andDepartmentNameNotIn(BaseQueryBean subQueryBean,
            IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysUserDepartmentRelateDAO.DepartmentName +
                " not in ", subQueryBean, dao);

            return this;
        }

        public Criteria andDepartmentNameBetween(String value1, String value2) {
            addCriterion(ISysUserDepartmentRelateDAO.DepartmentName +
                " between", value1, value2, "departmentName");

            return this;
        }

        public Criteria andDepartmentNameNotBetween(String value1, String value2) {
            addCriterion(ISysUserDepartmentRelateDAO.DepartmentName +
                " not between", value1, value2, "departmentName");

            return this;
        }
    }
}
